// This file configures the initialization of Sentry on the server.
// The config you add here will be used whenever the server handles a request.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from "@sentry/nextjs";
import { nodeProfilingIntegration } from "@sentry/profiling-node";

if (process.env.NODE_ENV !== "development") {
  Sentry.init({
    dsn: "https://c7fc26f00bccb8aa004a2c254df68f4b@o4507552400080896.ingest.us.sentry.io/4507552406765568",

    // Adjust this value in production, or use tracesSampler for greater control
    tracesSampleRate: 1,
    profilesSampleRate: 1.0, // Profiling sample rate is relative to tracesSampleRate
    integrations: [
      // Add profiling integration to list of integrations
      nodeProfilingIntegration(),
    ],
    // Setting this option to true will print useful information to the console while you're setting up Sentry.
    debug: false,

    // Uncomment the line below to enable Spotlight (https://spotlightjs.com)
    // spotlight: process.env.NODE_ENV === 'development',
  });
}
